import request from '@/utils/request'
import userRequest from '@/utils/user-request'

// VUE_APP_BASE_API
export function get(url, params) {
  return request({
    url,
    method: 'get',
    params
  })
}
export function post(url, data) {
  return request({
    url,
    method: 'post',
    data
  })
}
export function put(url, data) {
  return request({
    url,
    method: 'put',
    data
  })
}
export function del(url, params) {
  return request({
    url: url,
    method: 'delete',
    params
  })
}

// VUE_APP_BASE_USER_API
export function u_get(url, params) {
  return userRequest({
    url,
    method: 'get',
    params
  })
}
export function u_post(url, data) {
  return userRequest({
    url,
    method: 'post',
    data
  })
}
export function u_put(url, data) {
  return userRequest({
    url,
    method: 'put',
    data
  })
}
export function u_del(url, params) {
  return userRequest({
    url: url,
    method: 'delete',
    params
  })
}

export * from './modules/user'
export * from './modules/finance'
export * from './modules/basicinfo'
export * from './modules/warehouse'
export * from './modules/report'
export * from './modules/dashboard'
/* 图片上传*/
export * from './modules/upimag'
